#ifndef __PACKAGE_READER_H__
#define __PACKAGE_READER_H__

#include "Utils/BinaryIO.h"
#include "Engine/Point2.hpp"
#include "Engine/Point3.hpp"
#include "Engine/Vector2.hpp"
#include "Engine/Vector3.hpp"
#include "Engine/Quaternion.h"
#include "Engine/Ray3.h"
#include "Game/TerrainRaycastResult.hpp"
#include "Game/CellFace.h"
#include "Engine/Color4.hpp"
#include "Engine/GameGuid.h"

using namespace PocketSurvival::Engine;

namespace PocketSurvival
{
    class PackageReader : public Utils::MemoryBinaryReader
    {
    public:
        PackageReader(const char* buffer, uint32_t buffSize = -1);
        void readPoint2(Point2 &point);
        void readPoint3(Point3 &point3);
        void readBlockPoint3(Point3 &point);
        void readVector2(Vector2 &vector);
        void readVector3(Vector3 &vector3);
        void readQuaternion(Quaternion &quaternion);
        void readRay3(Ray3 &ray3);
        void readCellFace(CellFace &cellFace);
        void readColor4(Color4 &color);
        void readTerrainRaycastResult(TerrainRaycastResult &terrainRaycastResult);
        void readMatrix(Matrix &matrix);
        
        void readGuid(GameGuid &gameGuid);
    };

    inline PackageReader::PackageReader(const char* buffer, uint32_t buffSize) : MemoryBinaryReader(buffer, buffSize){}

} // namespace PocketSurvival

#endif